﻿@{
    ViewBag.Title = "Home Page";
}


<style>
    .sta-container {
        width: 100%;
        height: 100vh;
        background-color: #808080;
    }
</style>

@*
    <div class="row">
     <div class="col-md-4">
                        <h2>Getting started</h2>
                        <p>
                            ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that
                            enables a clean separation of concerns and gives you full control over markup
                            for enjoyable, agile development.
                        </p>
                        <p><a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkId=301865">Learn more &raquo;</a></p>
                    </div>
                    <div class="col-md-4">
                        <h2>Get more libraries</h2>
                        <p>NuGet is a free Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects.</p>
                        <p><a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkId=301866">Learn more &raquo;</a></p>
                    </div>
                    <div class="col-md-4">
                        <h2>Web Hosting</h2>
                        <p>You can easily find a web hosting company that offers the right mix of features and price for your applications.</p>
                        <p><a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkId=301867">Learn more &raquo;</a></p>
                    </div>



            </div>*@

<div class="sta-container">
    <div id="container-chat" style="width: 100%;height:100%;"></div>
</div>



@section scripts{
    <script type="text/javascript" src="~/Content/plugins/echarts/echarts.js"></script>
    <script>
        function loadchats(domId, xdata, ydata) {
            var elment = document.getElementById(domId);
            if (elment) {
                var myChart = echarts.init(elment, 'dark', {
                    renderer: 'canvas',
                    useDirtyRect: true
                });
                var app = {};

                var option;

                option = {
                    xAxis: {
                        type: 'category',
                        data: xdata
                    },
                    yAxis: {
                        type: 'value'
                    },
                    series: [
                        {
                            data: ydata,
                            type: 'line'
                        }
                    ]
                };

                if (option && typeof option === 'object') {
                    myChart.setOption(option);
                }

                window.addEventListener('resize', myChart.resize);
            }
        }

        $(function () {
            request({
                url: '/DatEny/GetOrderGrp',
                data: {},
                success: function (data) {
                    if (data && data.code == 200) {
                        loadchats("container-chat", data.data.OrderDate, data.data.Amount);
                    }
                    else {
                        alert(data.msg);
                    }
                }
            })

        })

        

    </script>

}
